package com.bootdo.program.wallpaper.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.program.wallpaper.dao.BzTalentDao;
import com.bootdo.program.wallpaper.domain.BzTalentDO;
import com.bootdo.program.wallpaper.service.BzTalentService;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional(rollbackFor=Exception.class)
public class BzTalentService {
	@Autowired
	private BzTalentDao bzTalentDao;
	
	
	public BzTalentDO get(Long id){
		return bzTalentDao.get(id);
	}
	
	
	public List<BzTalentDO> list(Map<String, Object> map){
		return bzTalentDao.list(map);
	}
	
	
	public int count(Map<String, Object> map){
		return bzTalentDao.count(map);
	}

	public List<BzTalentDO> listProfit(Map<String,Object> map){
		return bzTalentDao.listProfit(map);
	}

	public List<Integer> listProfitCount(Map<String,Object> map){
		return bzTalentDao.listProfitCount(map);
	}

	public BzTalentDO selectMoney(Map<String,Object> map){
		return bzTalentDao.selectMoney(map);
	}
	
	
	public int save(BzTalentDO bzTalent){
		return bzTalentDao.save(bzTalent);
	}
	
	
	public int update(BzTalentDO bzTalent){
		return bzTalentDao.update(bzTalent);
	}
	
	
	public int remove(Long id){
		return bzTalentDao.remove(id);
	}
	
	
	public int batchRemove(Long[] ids){
		return bzTalentDao.batchRemove(ids);
	}

	public int updatePassword(String loginPassword ,String userId){
		return bzTalentDao.updatePassword(loginPassword,userId);
	}

	public int updatePhone(String loginPassword,String userId){
		return bzTalentDao.updatePhone(loginPassword,userId);
	}

	public BzTalentDO getByWord(String word){
		return bzTalentDao.getByWord(word);
	}

	public List<BzTalentDO> getByRecommenderWord(String word){
		return bzTalentDao.getByRecommenderWord(word);
	}

	public BzTalentDO getByPhone(String phone){
		return bzTalentDao.getByPhone(phone);
	}

	public BzTalentDO getByUserId(String userId){
		return bzTalentDao.getByUserId(userId);
	}

	public void updateRecommenderWord(BzTalentDO bzTalentDO){
		bzTalentDao.updateRecommenderWord(bzTalentDO);
	}

	public int deleteUserByUserId(String userId){
		return bzTalentDao.deleteUserByUserId(userId);
	}
}
